/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * VentanaPrincipal.java
 *Clase pra el control de GraphPower, contiene toda la interfaz grafica de
 * la aplicacion
 * Created on 23/02/2011, 03:42:04 PM
 */
package tdr.vista;

import java.awt.BorderLayout;
import javax.swing.JScrollPane;

/**
 *
 * @author Lis
 */
public class VentanaPrincipal extends javax.swing.JFrame {

    /** Creates new form VentanaPrincipal */
    public VentanaPrincipal() {
        initComponents();
       
        panelDeInsercion.setLayout(new BorderLayout());
        GraphPanel graphPanel = new GraphPanel();
        //panelDeInsercion.setBounds(0, 0, 500, 300);
        panelDeInsercion.getRootPane().setDefaultButton(graphPanel.control.newButton);
       // graphPanel.setBounds(0, 0, 500, 300);
        panelDeInsercion.add(graphPanel.control, BorderLayout.NORTH);
        panelDeInsercion.add(new JScrollPane(graphPanel), BorderLayout.CENTER);
        graphPanel.setVisible(false);
        graphPanel.setVisible(true);
        this.pack();


    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        panelDeInsercion = new javax.swing.JPanel();
        jMenuBar1 = new javax.swing.JMenuBar();
        file = new javax.swing.JMenu();
        edit = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setResizable(false);

        panelDeInsercion.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 162, 255), 3, true), "Panel De Inserción"));
        panelDeInsercion.setPreferredSize(new java.awt.Dimension(580, 480));

        javax.swing.GroupLayout panelDeInsercionLayout = new javax.swing.GroupLayout(panelDeInsercion);
        panelDeInsercion.setLayout(panelDeInsercionLayout);
        panelDeInsercionLayout.setHorizontalGroup(
            panelDeInsercionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1000, Short.MAX_VALUE)
        );
        panelDeInsercionLayout.setVerticalGroup(
            panelDeInsercionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 697, Short.MAX_VALUE)
        );

        file.setText("Archivo");
        jMenuBar1.add(file);

        edit.setText("Edición");
        jMenuBar1.add(edit);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(panelDeInsercion, javax.swing.GroupLayout.DEFAULT_SIZE, 1014, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(panelDeInsercion, javax.swing.GroupLayout.DEFAULT_SIZE, 725, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new VentanaPrincipal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu edit;
    private javax.swing.JMenu file;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel panelDeInsercion;
    // End of variables declaration//GEN-END:variables
}
